import java.util.Arrays;

public class SecondQuestion {
    public static void main(String[] args) {
           int nums[] = {10,20,11,35,6,89};
           int temp;
        for (int i = 0; i <nums.length-1 ; i++) {

            for (int j = i+1; j <nums.length ; j++) {
                if (nums[i]>nums[j]) {
                    temp = nums[i];
                    nums[i] = nums[j];
                    nums[j] = temp;

                }
            }

        }
        System.out.println(Arrays.toString(nums));
    }
}
